package com.fen.java.web.listener.demo02;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

/**
 * @author : lrf
 * @description : 生死监听
 * @tip : 可以在这个监听器存放一些在tomcat启动时就要完成的代码！
 * @date : 2019/3/24
 */
@WebListener
public class AListener implements ServletContextListener {

    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("ServletContextListener#contextInitialized sce = " + sce);
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        System.out.println("ServletContextListener#contextDestroyed sce = " + sce);
    }
}
